<?php
class Rating extends AppModel {

	var $name = 'Rating';
	var $primaryKey = 'y';

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'Article' => array('className' => 'Article',
								'foreignKey' => 'article_id',
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'counterCache' => ''),
	);

	function findByIp($ipAddress = null,$articleId = null)
	{
		return (bool)$this -> find(array('article_id'=>$articleId,'ip_address'=>$ipAddress));
	}
}
?>